<template>
	<view class="con" v-if="stype==2">
		<view class="flex-ju-c flex-col center pt10vh pb40" style="border-bottom: 1px #E1E1E1 dashed;">
			<image mode="widthFix" class="image width231" src="/static/suu.png"></image>
			<view class="color999 size26">材料已销毁</view>
			<view>{{info.message}}</view>
		</view>
		
		<view  class="borderE1E1E1 size26 ra20 pg30-20 mt20 mb150">
			<view class="size30 bold mb20 mt20">合成信息</view>
			<view class="flex-ju-b">
				<view class="color999">{{type==0?'合成':type==2?'分解':'置换'}}数量</view>
				<view class="">{{unm}}</view>
			</view>
			<view v-for="(item,index) in info.data.get" :key="index" class="flex-ju-b mt10">
				<view class="color999">{{item.title}}</view>
				<view class="">x{{item.count}}</view>
			</view>
			
			<view v-for="(item,index1) in info.data.tui" :key="index1" class="size30 bold mb20 mt30">返还信息</view>
			<view v-for="(item,index) in info.data.tui" :key="index" class="flex-ju-b mt10">
				<view class="color999">
					{{item.title}}
				</view>
				<view class="">x{{item.count}}</view>
			</view>
		</view>
		
		<view class=" posifi width92vw bottom0 " >
			<view class="ra20 flex-ju-b pg30 bgfff height80"  style="box-shadow: 0rpx -8rpx 24rpx 0rpx rgba(0,0,0,0.06);">
				<view @click="tappays"  class="bold width1000 height100 bg000 colorfff ra20 flex-ju-c size29  ">
					完成
				</view>
			</view>
		</view>
	</view>
	<view class="con" v-else>
		<view class="flex-ju-c flex-col center pt10vh pb40" style="border-bottom: 1px #E1E1E1 dashed;">
			<image mode="widthFix" class="image width231" src="/static/suu.png"></image>
			<view>{{info.message}}</view>
			<!-- <view>{{type==0?'合成':type==2?'分解':'置换'}}成功</view> -->
			<view class="color999 size26">材料已销毁</view>
		</view>
		
		<view  class="borderE1E1E1 size26 ra20 pg30-20 mt20 mb150">
			<view class="size30 bold mb20 mt20">{{type==0?'合成':type==2?'分解':'置换'}}信息</view>
			<view class="flex-ju-b">
				<view class="color999">{{type==0?'合成':type==2?'分解':'置换'}}数量</view>
				<view class="">{{unm}}</view>
			</view>
			<view v-for="(item,index) in info.data.get" :key="index" class="flex-ju-b mt10">
				<view class="color999">{{item.title}}</view>
				<view class="">x{{item.count?item.count:'1'}}</view>
			</view>
		</view>
		
		<view class=" posifi width92vw bottom0 " >
			<view class="ra20 flex-ju-b pg30 bgfff height80"  style="box-shadow: 0rpx -8rpx 24rpx 0rpx rgba(0,0,0,0.06);">
				<view @click="tappays"  class="bold width1000 height100 bg000 colorfff ra20 flex-ju-c size29  ">
					完成
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				type:0,
				unm:"",
				stype:"",
				info:{
					data:{
						tui:[],
						get:[]
					}
				},
			}
		},
		onLoad(option) {
			this.type = option.type
			this.stype=option.stype
			this.unm = option.unm
			this.info = JSON.parse(option.tui)
			if(this.type==2||this.type==1){
				this.info.data[0].count=option.unm
				this.info.data.get = this.info.data
			}
		},
		methods: {
			tappays(){
				
				uni.navigateBack()
				
				// uni.reLaunch({
				// 	url:"/pages/user/index"
				// })
			}
		}
	}
</script>

<style>

</style>
